package com.xinqi.common.xxl.job;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * xxl-job 属性配置
 *
 * @author linkai
 * @date 2023/3/19
 */
@Data
@ConfigurationProperties(prefix = "xxl.job")
public class XxlJobProperties {

    private Admin admin;

    private Executor executor;

    @Data
    public static class Admin {
        /**
         * xxl-job admin address
         */
        private String addresses;
        /**
         * xxl-job admin token
         */
        private String accessToken;

    }

    @Data
    public static class Executor {
        /**
         * 集群部署，这两项配置要一致
         */
        private String appName;
        private String address;
        private String ip;
        private Integer port;
        private String logPath;
        private Integer logRetentionDays;
    }
}
